package day04;

import java.util.Arrays;

public class MaoPao {
public static void main(String[] args) {
	int[]arry =new int[] {5,8,8,74,54,44,99,58,54};
	System.out.println("排序前的数组");
for (int i = 0; i < arry.length; i++) {
	System.out.print(arry[i]+" ");
	
}

//进行排序
//临时变量，用交换两个元素
int temp;
for (int i = 0; i < arry.length; i++) {
	for (int j = i; j < arry.length; j++) {
		if (arry[i]<arry[j]) {
			temp =arry[j];
		    arry[j]	=arry[i];
			arry[i]=temp;
							
		}
	}
}
System.out.println();
System.out.println("排序后的数组");
for (int i = 0; i < arry.length; i++) {
	
  }
    }
  }
